// ----------------------------------------------------------------------------
// serialize_counted_pointer_member.h
// ----------------------------------------------------------------------------
#pragma once
#include <fw/base/serialize/serialize_pointer_member.h>

namespace fw
{
	class ByteReader;
	class ByteWriter;
	
	class SerializeCountedPointerMember : public SerializePointerMember
	{
	private:
		Hash			m_countName;
		
	public:
		SerializeCountedPointerMember(int count, Hash typeName, Hash countName);
		
		virtual int			GetPointerCount	(const char* scopeData, int index) const;
		virtual uint64_t	GetCheckSum		(uint64_t basis) const;
		
		virtual void		Write			(ByteWriter& writer) const;
		static SerializeCountedPointerMember* ReadNew(ByteReader& reader);
		
	}; // class SerializeCountedPointerMember
	
} // namespace fw
